listview: Use gtk_widget_add_css_class
authorMatthias Clasen <mclasen@redhat.com>
Wed, 3 Jun 2020 21:36:52 +0000 (17:36 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 3 Jun 2020 21:51:22 +0000 (17:51 -0400)
No need to use the style context api for this anymore.

gtk/gtklistview.c

index 35a3df93393d1adc18c4467e65a046521723a066..90b594da3074e484951c5f8ba435745ef995685b 100644 (file)
@@ -994,9 +994,9 @@ gtk_list_view_set_show_separators (GtkListView *self,
   self->show_separators = show_separators;
 
   if (show_separators)
-    gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (self)), "separators");
+    gtk_widget_add_css_class (GTK_WIDGET (self), "separators");
   else
-    gtk_style_context_remove_class (gtk_widget_get_style_context (GTK_WIDGET (self)), "separators");
+    gtk_widget_remove_css_class (GTK_WIDGET (self), "separators");
 
   g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SHOW_SEPARATORS]);
 }